package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 租赁日期列表
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_park_space_date")
public class ParkSpaceDate extends Model<ParkSpaceDate> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "did", type = IdType.ASSIGN_ID)
    private String did;
    /**
     * 租赁时间
     */
    @TableField("lease_time")
    private LocalDateTime leaseTime;
    /**
     * 租赁ID
     */
    @TableField("sid")
    private String sid;
    /**
     * 租赁人
     */
    @TableField(updateStrategy = FieldStrategy.ALWAYS, value = "tenant")
    private String tenant;
    /**
     * 租赁人车牌号
     */
    @TableField(updateStrategy = FieldStrategy.ALWAYS, value = "tenant_number")
    private String tenantNumber;

    public void freeData() {
        this.did = null;
        this.leaseTime = null;
        this.sid = null;
        this.tenant = null;
        this.tenantNumber = null;
    }

}
